multiple_ids <- stan %>% count(uid) %>% filter(n > 1) %>% select(uid) %>% as.vector() %>% unlist()

multiple_ids <- stan %>% group_by(uid) %>%
  summarize(n = n(),
            treatment = sum(treatment)) %>%
  filter(n > 1) %>% filter(n != treatment) %>% 
  filter(treatment != 0) %>% 
  select(uid) %>% as.vector() %>% unlist() %>% as.character()

repeats <- stan %>% filter(uid %in% multiple_ids)
repeats_violence <- stan_violence %>% filter(uid %in% multiple_ids) 
repeats_norms <- stan_norms %>% filter(uid %in% multiple_ids) 
repeats_affpol <- stan_affpol %>% filter(uid %in% multiple_ids) 

x1 <- lm_robust(violence ~ days_scaled * treatment, data = repeats_violence, fixed_effects = uid, weights = weight)
summary(x1)
confint(x1)

x2 <- lm_robust(norms ~ days_scaled * treatment, data = repeats_norms, fixed_effects = uid, weights = weight)
summary(x2)
confint(x2)

x3 <- lm_robust(affpol ~ days_scaled * treatment, data = repeats_affpol, fixed_effects = uid, weights = weight)
summary(x3)
confint(x3)

texreg::texreg(
  list(x1,x2,x3),
  caption = "Results -- Re-interviews",
  scalebox = .9,
  include.ci = F,
  table = F,
  use.packages = F
)